/**
 *弹出面板管理器 
 */
package com.zqGame.roundFightGame.popPanel
{
	import com.notice.NoticeCC;
	import com.zqGame.roundFightGame.data.DataCache;
	import com.zqGame.roundFightGame.noticeType.ConstCC;
	import com.zqGame.roundFightGame.popPanel.panels.MasterInfoPanel;

	public class PopPanelManager
	{
		private static var i:PopPanelManager;
		private var masterInfoPanel:MasterInfoPanel;
		
		public function PopPanelManager()
		{
			NoticeCC.addListener(ConstCC.OPEN_MASTER_INFO_PANEL, openMasterInfoPanel);
		}
		
		public static function get I():PopPanelManager
		{
			if(i == null)
				i = new PopPanelManager();
			return i;
		}
		
		private function openMasterInfoPanel($data:Object):void
		{
			if(masterInfoPanel == null)
			{
				masterInfoPanel = new MasterInfoPanel("AttPanel");
				masterInfoPanel.iniConfig(DataCache.I.roleInfoArr[0]);
			}
				
			masterInfoPanel.open();
		}
	}
}